3.13 \(\int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^2 \, dx\)

Optimal. Leaf size=73 \[ \frac {3 a^2 c^2 \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {a^2 c^2 \tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3 a^2 c^2 \tan (e+f x) \sec (e+f x)}{8 f} \]

[Out]

3/8*a^2*c^2*arctanh(sin(f*x+e))/f-3/8*a^2*c^2*sec(f*x+e)*tan(f*x+e)/f+1/4*a^2*c^2*sec(f*x+e)*tan(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {3958, 2611, 3770} \[ \frac {3 a^2 c^2 \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac {a^2 c^2 \tan ^3(e+f x) \sec (e+f x)}{4 f}-\frac {3 a^2 c^2 \tan (e+f x) \sec (e+f x)}{8 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + a*Sec[e + f*x])^2*(c - c*Sec[e + f*x])^2,x]

[Out]

(3*a^2*c^2*ArcTanh[Sin[e + f*x]])/(8*f) - (3*a^2*c^2*Sec[e + f*x]*Tan[e + f*x])/(8*f) + (a^2*c^2*Sec[e + f*x]*
Tan[e + f*x]^3)/(4*f)

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3958

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)
)^(n_.), x_Symbol] :> Dist[(-(a*c))^m, Int[ExpandTrig[csc[e + f*x]*cot[e + f*x]^(2*m), (c + d*csc[e + f*x])^(n
 - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegersQ[m,
 n] && GeQ[n - m, 0] && GtQ[m*n, 0]

Rubi steps

\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x))^2 (c-c \sec (e+f x))^2 \, dx &=\left (a^2 c^2\right ) \int \sec (e+f x) \tan ^4(e+f x) \, dx\\ &=\frac {a^2 c^2 \sec (e+f x) \tan ^3(e+f x)}{4 f}-\frac {1}{4} \left (3 a^2 c^2\right ) \int \sec (e+f x) \tan ^2(e+f x) \, dx\\ &=-\frac {3 a^2 c^2 \sec (e+f x) \tan (e+f x)}{8 f}+\frac {a^2 c^2 \sec (e+f x) \tan ^3(e+f x)}{4 f}+\frac {1}{8} \left (3 a^2 c^2\right ) \int \sec (e+f x) \, dx\\ &=\frac {3 a^2 c^2 \tanh ^{-1}(\sin (e+f x))}{8 f}-\frac {3 a^2 c^2 \sec (e+f x) \tan (e+f x)}{8 f}+\frac {a^2 c^2 \sec (e+f x) \tan ^3(e+f x)}{4 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 51, normalized size = 0.70 \[ \frac {a^2 c^2 \left (6 \tanh ^{-1}(\sin (e+f x))-(5 \cos (2 (e+f x))+1) \tan (e+f x) \sec ^3(e+f x)\right )}{16 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])^2*(c - c*Sec[e + f*x])^2,x]

[Out]

(a^2*c^2*(6*ArcTanh[Sin[e + f*x]] - (1 + 5*Cos[2*(e + f*x)])*Sec[e + f*x]^3*Tan[e + f*x]))/(16*f)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 99, normalized size = 1.36 \[ \frac {3 \, a^{2} c^{2} \cos \left (f x + e\right )^{4} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, a^{2} c^{2} \cos \left (f x + e\right )^{4} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (5 \, a^{2} c^{2} \cos \left (f x + e\right )^{2} - 2 \, a^{2} c^{2}\right )} \sin \left (f x + e\right )}{16 \, f \cos \left (f x + e\right )^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2*(c-c*sec(f*x+e))^2,x, algorithm="fricas")

[Out]

1/16*(3*a^2*c^2*cos(f*x + e)^4*log(sin(f*x + e) + 1) - 3*a^2*c^2*cos(f*x + e)^4*log(-sin(f*x + e) + 1) - 2*(5*
a^2*c^2*cos(f*x + e)^2 - 2*a^2*c^2)*sin(f*x + e))/(f*cos(f*x + e)^4)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2*(c-c*sec(f*x+e))^2,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(-3*a^2*c^2/32*ln(abs(sin(f*x+exp(1))-1))+3*a^2*c^2/32*ln(
abs(sin(f*x+exp(1))+1))-(-5*sin(f*x+exp(1))^3*a^2*c^2+3*sin(f*x+exp(1))*a^2*c^2)*1/16/(sin(f*x+exp(1))^2-1)^2)

________________________________________________________________________________________

maple [A]  time = 0.87, size = 75, normalized size = 1.03 \[ -\frac {5 a^{2} c^{2} \sec \left (f x +e \right ) \tan \left (f x +e \right )}{8 f}+\frac {3 a^{2} c^{2} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8 f}+\frac {a^{2} c^{2} \tan \left (f x +e \right ) \left (\sec ^{3}\left (f x +e \right )\right )}{4 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))^2*(c-c*sec(f*x+e))^2,x)

[Out]

-5/8*a^2*c^2*sec(f*x+e)*tan(f*x+e)/f+3/8/f*a^2*c^2*ln(sec(f*x+e)+tan(f*x+e))+1/4/f*a^2*c^2*tan(f*x+e)*sec(f*x+
e)^3

________________________________________________________________________________________

maxima [B]  time = 0.54, size = 150, normalized size = 2.05 \[ -\frac {a^{2} c^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 8 \, a^{2} c^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 16 \, a^{2} c^{2} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right )}{16 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2*(c-c*sec(f*x+e))^2,x, algorithm="maxima")

[Out]

-1/16*(a^2*c^2*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e))/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f*x
+ e) + 1) + 3*log(sin(f*x + e) - 1)) - 8*a^2*c^2*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1)
+ log(sin(f*x + e) - 1)) - 16*a^2*c^2*log(sec(f*x + e) + tan(f*x + e)))/f

________________________________________________________________________________________

mupad [B]  time = 5.21, size = 155, normalized size = 2.12 \[ \frac {-\frac {3\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7}{4}+\frac {11\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{4}+\frac {11\,a^2\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{4}-\frac {3\,a^2\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{4}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {3\,a^2\,c^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{4\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a/cos(e + f*x))^2*(c - c/cos(e + f*x))^2)/cos(e + f*x),x)

[Out]

((11*a^2*c^2*tan(e/2 + (f*x)/2)^3)/4 + (11*a^2*c^2*tan(e/2 + (f*x)/2)^5)/4 - (3*a^2*c^2*tan(e/2 + (f*x)/2)^7)/
4 - (3*a^2*c^2*tan(e/2 + (f*x)/2))/4)/(f*(6*tan(e/2 + (f*x)/2)^4 - 4*tan(e/2 + (f*x)/2)^2 - 4*tan(e/2 + (f*x)/
2)^6 + tan(e/2 + (f*x)/2)^8 + 1)) + (3*a^2*c^2*atanh(tan(e/2 + (f*x)/2)))/(4*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} c^{2} \left (\int \sec {\left (e + f x \right )}\, dx + \int \left (- 2 \sec ^{3}{\left (e + f x \right )}\right )\, dx + \int \sec ^{5}{\left (e + f x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**2*(c-c*sec(f*x+e))**2,x)

[Out]

a**2*c**2*(Integral(sec(e + f*x), x) + Integral(-2*sec(e + f*x)**3, x) + Integral(sec(e + f*x)**5, x))

________________________________________________________________________________________